/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.diplomka.datalayer.dao;

import cz.fi.muni.diplomka.common.Coordinates;
import cz.muni.fi.diplomka.datalayer.entity.TileEntity;
import java.util.List;

/**
 * Interface for manipulation with Tile Entity
 *
 * @author Jakub Kutil
 */
public interface TileDao {

    /**
     * Adds new Tile into DB
     *
     * @param tileEntity Tile to add
     */
    public void addTile(TileEntity tileEntity);

    /**
     * Edits a Tile in DB
     *
     * @param tileEntity Tile to edit
     */
    public void editTile(TileEntity tileEntity);

    /**
     * Deletes Tile from DB
     *
     * @param coordinates Coordinates of Tile to delete
     */
    public void deleteTile(Coordinates coordinates);

    /**
     * Gets all Tiles from DB
     *
     * @return List of all Tiles
     */
    public List<TileEntity> getAllTiles();

    /**
     * Gets 10x10 square of game world from DB
     *
     * @param x x-coordinate of upper left corner of square part
     * @param y y-coordinate of upper left corner of square part
     *
     * @return List with Tiles from 10x10 square
     */
    public List<TileEntity> getSquareOfTiles(int x, int y);

    /**
     * Gets all Tiles of specified type from DB
     *
     * @param type specified type
     *
     * @return List of all Tiles with specified type
     */
    public List<TileEntity> getAllTilesOfType(String type);

    /**
     * Gets coordinates of upper left corner of game world from DB
     *
     * @return coordinares of upper left corner
     */
    public Coordinates getUpperLeftCorner();

    /**
     * Gets coordinates of lower right corner of game world from DB
     *
     * @return coordinares of upper left corner
     */
    public Coordinates getLowerRightCorner();

    /**
     * Gets Tile at specified location from DB
     *
     * @param x x-coordinate of TileEntity
     * @param y y-coordinate of TileEntity
     *
     * @return found Tile or empty Tile if no tile is found
     */
    public TileEntity getTileAtPosition(int x, int y);
}
